// const bcrypt = require('bcrypt')
// const saltRounds = 10

// bcrypt.hash('12345678', saltRounds, (err, data) => {
//   // console.log(data)
// })

// bcrypt.compare('12345678', '$2b$10$3AbL5vUuF3RAnrd3l8NK1eJU1a52JX4gzrWadSooFB5rX8kZicQsm').then(result => {
//   console.log(result)
// })

/*======= 插入超级管理员部分 =======*/
const bcrypt=require('bcrypt')
const Admin=require('./../sql/models/Admin')
const sql=require('./../sql')
const utils=require('./index')
const saltRounds=10

bcrypt.hash('123456',saltRounds,(err,data)=>{
  sql.insert(Admin,{
    adminid:'admin_'+utils.getUuid(),
    adminname:'songwenjie',
    password:data,
    role:2
  }).then(()=>{
    console.log('插入超级管理员成功')
   
  }).catch(err=>{
    console.log(err)
  })
})